<template>
    <view class="song-list-item">
        <image :src="songListItem.coverImgUrl" class="logo" />
        <view class="right">
           <view class="text"><text class="song-name">{{ songListItem.name }}</text></view>
           <view class="text"><text>{{ songListItem.trackCount }}首 {{ songListItem.description}}</text></view>
        </view>
    </view>
  </template>
  
  <script setup lang="ts">
  import { ref } from 'vue'
  
  import type { UserPlaylistType } from '@/services/type'
  
  interface Props {
    songListItem: UserPlaylistType
  }
  
  const props = defineProps<Props>()
  
  
  </script>
  
  <style lang="scss" scoped>
  .song-list-item {
    width: 100vw;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ccc;
    .logo {
        width: 55px;
        height: 55px;
        margin: 5px;
        margin-right: 10px;
        flex-shrink: 0;
    }
    .right {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        .song-name {
            font-size: 18px;
            font-weight: bold;
            color: #333;
        }
        .text {
            font-size: 14px;
            color: #999;
            width: 90%;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
            text-overflow: ellipsis; /* 超出部分显示省略号 */
            white-space: nowrap; /* 不换行 */
        }
    }
  }
  </style>
  